package 继承和final的修饰;
/**
 * //fianl修饰的类不能被继承
     final class AnimalDemo{
	//方法体为空
    }
    class Dog extends AnimalDemo{
	   //报错，是因为final修饰的类不能给继承
           }
 * @author 宋利军
 *
 */
class AniamlDemo{
	public final void shhout(){
		
	}
}
class Dog1 extends AniamlDemo{
	   public void shout(){
        }

public static class finalDemo {
	 public static void main(String[] args) {
		 Dog1 dog1=new Dog1();
	}
  }
}
